<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 统计字符串中重复字符的次数,并且去掉重复
        var str ='aabccd'
        //统计每个字符出现的次数，结果显示 a 2、b 1、c 
        //最后 输出字符串abcd
    </script>
</body>
</html>